package com.cet.lxf.collection.test12;

import java.util.*;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-08-17 21:32
 **/
public class Main {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("apple");
        list.add("pear");
        Collection<String> unmodifiableList = Collections.unmodifiableCollection(list);
        unmodifiableList.add("banana");
    }
}
